#include <BustaNetClient.h>
Public Member Functions | |
BustaNetClient () | |
Constructor. | |
~BustaNetClient () | |
Destructor. | |
char * | init () |
Initializes the client and prepares it for connection. | |
connect_resp * | connect (char *IP, Uint16 serverPort) |
Connects to a server using a given port. | |
void | disconnect () |
Disconnects from the server. | |
void | processNet () |
Handles all incoming network data. | |
void | sendGameOver () |
Notifies the server that the player has lost the game. | |
void | sendOpponentViewReq (int opponentID) |
Tells the server which opponent the player wishes to view. |
Busta'Sandwich Client for networked multiplayer games.
|
Constructor. Initializes variables |
|
Destructor. Close any open connections and shutdown SDLNet |
|
Connects to a server using a given port. The client initializes a TCP connect with the server on the specified port. On successful connection, an attempt to join the game is made.
|
|
Disconnects from the server. The connection between the server and client is disconnected. Subsequent connections may be made using the client |
|
Initializes the client and prepares it for connection. Initializes SDLNet. Relays any error message back.
|
|
Handles all incoming network data. Processes all data currently queued on the TCP socket. The data is partitioned out into three message containers. Each of these three message containers is accessible through an accompanying method.
|
|
Notifies the server that the player has lost the game. A message is sent to the server to notify it that the player has lost in the current multiplayer game. |
|
Tells the server which opponent the player wishes to view. A message is sent to the server to tell it which opponent the player wishes to have a detailed view of. The detailed view contains information to display the entire screen of the opponent rather than limited brief data.
|